package com.mxpio.erp.common.equipment.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import com.mxpioframework.security.entity.Dept;
import com.mxpioframework.security.entity.User;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * @Description: 仓库定义
 * @Author: wxy
 * @Date:   2021-10-06
 * @Version: V1.0
 */
@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_EQUIPMENT_STOCK")
@Schema(description="仓库定义")
public class EquipmentStock  extends BaseEntity {
    private static final long serialVersionUID = 1L;

	/**主键*/
    @Id
    @Generator
    @Column(name = "ID_", updatable = false)
    @Schema(description = "ID")
    private String id;
	/**仓库编码*/
    @Column(name = "STOCK_CODE_")
    @Schema(description = "仓库编码")
    private String stockCode;
	/**仓库名称*/
    @Column(name = "STOCK_NAME_")
    @Schema(description = "仓库名称")
    private String stockName;
	/**仓库地点*/
    @Column(name = "ADDRESS_")
    @Schema(description = "仓库地点")
    private String address;
	/**厂区*/
	@Dict(dicCode = "ERP_EQUIPMENT_FACTORY")
    @Column(name = "FACTORY_")
    @Schema(description = "厂区")
    private String factory;
	/**区域*/
    @Column(name = "AREA_ID_")
    @Dict(dicCode="id", dicEntity = EquipmentArea.class, dicText = "areaName")
    @Schema(description = "区域")
    private String areaId;
	/**库房类别*/
    // todo entity缺失
    @Dict(dicCode="id", dicEntity = EquipmentStockType.class, dicText = "stockTypeName")
    @Column(name = "STOCK_TYPE_ID_")
    @Schema(description = "库房类别")
    private String stockTypeId;
	/**部门*/
	@Dict(dicEntity = Dept.class, dicText = "deptName", dicCode = "deptCode")
    @Column(name = "DEPT_ID_")
    @Schema(description = "部门")
    private String deptId;
	/**管理员*/
	@Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
    @Column(name = "ADMINISTRATOR")
    @Schema(description = "管理员")
    private String administrator;
	/**责任人1*/
	@Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
    @Column(name = "DUTY_USER1_")
    @Schema(description = "责任人1")
    private String dutyUser1;
	/**责任人1电话*/
    @Column(name = "DUTY_USER1_MOBILE_")
    @Schema(description = "责任人1电话")
    private String dutyUser1Mobile;
	/**责任人2*/
	@Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
    @Column(name = "DUTY_USER2_")
    @Schema(description = "责任人2")
    private String dutyUser2;
	/**责任人2电话*/
    @Column(name = "DUTY_USER2_MOBILE_")
    @Schema(description = "责任人2电话")
    private String dutyUser2Mobile;
	/**责任人3*/
	@Dict(dicEntity = User.class, dicText = "nickname", dicCode = "username")
    @Column(name = "DUTY_USER3_")
    @Schema(description = "责任人3")
    private String dutyUser3;
	/**责任人3电话*/
    @Column(name = "DUTY_USER3_MOBILE_")
    @Schema(description = "责任人3电话")
    private String dutyUser3Mobile;
	/**备注*/
    @Column(name = "REMARKS_")
    @Schema(description = "备注")
    private String remarks;

}
